import  { Router, Request, Response } from "express";
import express = require("express");
import DataSourceController from "./data-souce.controller";

const router: Router = express.Router();
const controller = new DataSourceController();
//获取数据源
router.get("/api/dataSource/getPageList", (req:Request, res:Response, next) => {
  const { body, query, params } = req;
  console.log("dataSourceRouter-getPageList", body, query, params);
  controller.getList(req, res);
});
//添加数据源
router.post("/api/dataSource/add", (req:Request, res:Response, next) => {
  const { body, query, params } = req;
  console.log("dataSourceRouter-getPageList", body, query, params);
  controller.getList(req, res);
});
export default router;
